//
//  NSString+THCommon.h
//  MengLiao
//
//  Created by xiuxin on 2022/7/15.
//  Copyright © 2022 BaseBusiness. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (THCommon)

- (BOOL)zh_isTrue;
/// yes:字符串存在 no:空字符串
- (BOOL)isNoEmpty;

+ (NSString*)generateUdid;

+ (NSMutableDictionary *)paramDictFromURL:(NSString *)url;

+ (NSMutableDictionary *)paramDictFromURL:(NSString *)url urlDecode:(BOOL)urlDecode;

- (NSURL *)kURL;

- (NSString *)subStringFrom:(NSString *)startString to:(NSString *)endString;

//过滤字符串的空格 和回车
- (NSString*)hqFliterBlankAndEnter;

///获取url后缀图片size
- (CGSize)zh_imageUrlSize;

///计算头像框宽度
- (CGFloat)zh_calImageWidth:(CGFloat)height;

- (NSData *)base64Decode;

- (BOOL)lcck_isSpace;

/// 每隔几位加,分割字符串
+(NSString *)countNumAndChangeformat:(NSString *)num;

- (NSInteger)countOccurencesOfString:(NSString*)searchString;


/// URL 后加时间戳
- (NSString*)appendTimeUrl;

// 当文件名为中文时，解决url编码问题
- (NSString *)URLDecodedString;

/// 白点包
/// @"Red",@"Packet"
+ (NSString *)WhitePoint;
/// @"red",@"Packet"
+ (NSString *)SmallWhitePoint:(NSString *)str;
/// @"red",@"packet"
+ (NSString *)AllSmallWhitePoint:(NSString *)str;
/// @"红",@"包"
+ (NSString *)WhitePointCh:(NSString *)prefix suffix:(NSString *)suffix;

/// @"V" @"ip"
+ (NSString *)Vguest:(NSString *)prefix suffix:(NSString *)suffix;
/// @"v" @"ip"
+ (NSString *)SmallVguest:(NSString *)str;
/// @"V" @"IP"
+ (NSString *)BigllVguest:(NSString *)prefix suffix:(NSString *)suffix;
/// @"金"  @"币"
+ (NSString *)jinbiCh:(NSString *)prefix suffix:(NSString *)suffix;

/// RecFun
+ (NSString *)RecFunApiChange:(NSString *)str;

@end

NS_ASSUME_NONNULL_END
